#ifndef __HIKARI_CHUNK__
#define __HIKARI_CHUNK__

#include<iostream>
using namespace std;

namespace HikariChunkType{
enum ChunkType{
	STRING= 1,
    SECTION,
    INTEGER,
    CHAR,
    SHORT,
    LONG,
    FLOAT,
    DOUBLE,
    BOOLEAN,
    BYTE,
    ARRAY_OF_LONG,
    SCOLOR,
    VECTOR,
    DIMENSION2D,
	ARRAY_OF_BOOLEANS,
	ARRAY_OF_VECTORS,
	ARRAY_OF_INTS,

};
};

class Chunk
{
private:
	wstring _name;
	long _pointer;
	HikariChunkType::ChunkType  _chunkType;
	
public:

	static wstring toString(HikariChunkType::ChunkType type){
		switch(type){
		case HikariChunkType::STRING:
			return wstring(L"String");
		case HikariChunkType::SECTION:
			return wstring(L"Section");
		case HikariChunkType::INTEGER:
			return wstring(L"Integer");
		case HikariChunkType::CHAR:
			return wstring(L"Char");
		case HikariChunkType::SHORT:
			return wstring(L"Short");
		case HikariChunkType::LONG:
			return wstring(L"Long");
		case HikariChunkType::FLOAT:
			return wstring(L"Float");
		case HikariChunkType::DOUBLE:
			return wstring(L"Double");
		case HikariChunkType::BOOLEAN:
			return wstring(L"Boolean");
		case HikariChunkType::BYTE:
			return wstring(L"Byte");
		case HikariChunkType::ARRAY_OF_LONG:
			return wstring(L"ArrayOfLongs");
		case HikariChunkType::SCOLOR:
			return wstring(L"SColor");
		case HikariChunkType::VECTOR:
			return wstring(L"Vector");
		case HikariChunkType::DIMENSION2D:
			return wstring(L"Dimension2df");
		case HikariChunkType::ARRAY_OF_BOOLEANS:
			return wstring(L"ArrayOfBooleans");
		case HikariChunkType::ARRAY_OF_VECTORS:
			return wstring(L"ArrayOfVectors");
		case HikariChunkType::ARRAY_OF_INTS:
			return wstring(L"ArrayOfInts");
		default:
			throw wstring(L"undefined chunk type");
		}
	}

	Chunk(wstring name, long pointer, HikariChunkType::ChunkType chunkType){
		this->_name=name;
		this->_pointer=pointer;
		this->_chunkType=chunkType;
	}

	~Chunk(void){
	}

	HikariChunkType::ChunkType getChunkType(){
		return _chunkType;
	}

	void setString(wstring chunk){
		_name=chunk;
	}

	void setPointer(long pointer){
		this->_pointer=pointer;
	}

	wstring&getName(){
		return _name;
	}

	long getPointer(){
		return _pointer;
	}
};


#endif